<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>hart_ballot module documentation &mdash; &lt;project&gt;</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '0.2beta',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="&lt;project&gt;" href="index.html" />
    <link rel="up" title="Supported Ballots" href="ballots.html" />
    <link rel="next" title="saguache_ballot module documentation" href="saguache_ballot.html" />
    <link rel="prev" title="demo_ballot module documentation" href="demo_ballot.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="saguache_ballot.html" title="saguache_ballot module documentation"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="demo_ballot.html" title="demo_ballot module documentation"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">&lt;project&gt;</a> &raquo;</li>
          <li><a href="ballots.html" accesskey="U">Supported Ballots</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-hart_ballot">
<h1>hart_ballot module documentation<a class="headerlink" href="#module-hart_ballot" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="hart_ballot.HartBallot">
<em class="property">class </em><tt class="descname">HartBallot</tt><big>(</big><em>images</em>, <em>extensions</em><big>)</big><a class="headerlink" href="#hart_ballot.HartBallot" title="Permalink to this definition">¶</a></dt>
<dd><p>Class representing ballots from Hart Intersystems.</p>
<p>Each Hart ballot has dark rectangles around voting areas,
and voting areas are grouped in boxed contests.</p>
<dl class="method">
<dt id="hart_ballot.HartBallot.build_layout">
<tt class="descname">build_layout</tt><big>(</big><em>page</em><big>)</big><a class="headerlink" href="#hart_ballot.HartBallot.build_layout" title="Permalink to this definition">¶</a></dt>
<dd>get layout and ocr information</dd></dl>

<dl class="method">
<dt id="hart_ballot.HartBallot.extract_VOP">
<tt class="descname">extract_VOP</tt><big>(</big><em>page</em>, <em>rotate</em>, <em>scale</em>, <em>choice</em><big>)</big><a class="headerlink" href="#hart_ballot.HartBallot.extract_VOP" title="Permalink to this definition">¶</a></dt>
<dd>Extract a single oval, or writein box, from the specified ballot</dd></dl>

<dl class="method">
<dt id="hart_ballot.HartBallot.find_landmarks">
<tt class="descname">find_landmarks</tt><big>(</big><em>page</em><big>)</big><a class="headerlink" href="#hart_ballot.HartBallot.find_landmarks" title="Permalink to this definition">¶</a></dt>
<dd><p>retrieve landmarks for Hart images, set tang, xref, yref</p>
<p>Landmarks for the Hart Ballot will be the ulc, urc, lrc, llc 
(x,y) pairs marking the four corners of the main surrounding box.</p>
</dd></dl>

<dl class="method">
<dt id="hart_ballot.HartBallot.flip">
<tt class="descname">flip</tt><big>(</big><em>im</em><big>)</big><a class="headerlink" href="#hart_ballot.HartBallot.flip" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="hart_ballot.HartBallot.get_layout_code">
<tt class="descname">get_layout_code</tt><big>(</big><em>page</em><big>)</big><a class="headerlink" href="#hart_ballot.HartBallot.get_layout_code" title="Permalink to this definition">¶</a></dt>
<dd>Determine the layout code(s) from the ulc barcode(s)</dd></dl>

</dd></dl>

<dl class="function">
<dt id="hart_ballot.good_barcode">
<tt class="descname">good_barcode</tt><big>(</big><em>code_string</em><big>)</big><a class="headerlink" href="#hart_ballot.good_barcode" title="Permalink to this definition">¶</a></dt>
<dd>check code for obvious flaws</dd></dl>

<dl class="function">
<dt id="hart_ballot.ocr">
<tt class="descname">ocr</tt><big>(</big><em>im</em>, <em>contests</em>, <em>dpi</em>, <em>x1</em>, <em>x2</em>, <em>splits</em>, <em>xtnz</em><big>)</big><a class="headerlink" href="#hart_ballot.ocr" title="Permalink to this definition">¶</a></dt>
<dd>ocr runs ocr and assembles appends to the list of BtRegions</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h4>Previous topic</h4>
            <p class="topless"><a href="demo_ballot.html"
                                  title="previous chapter">demo_ballot module documentation</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="saguache_ballot.html"
                                  title="next chapter">saguache_ballot module documentation</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="_sources/hart_ballot.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="saguache_ballot.html" title="saguache_ballot module documentation"
             >next</a> |</li>
        <li class="right" >
          <a href="demo_ballot.html" title="demo_ballot module documentation"
             >previous</a> |</li>
        <li><a href="index.html">&lt;project&gt;</a> &raquo;</li>
          <li><a href="ballots.html" >Supported Ballots</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2008-2011, Mitch Trachtenberg.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.6.
    </div>
  </body>
</html>